package dper.study.codes;

import dper.study.codes.concurrent.api.ConcurrentExampleAPI;
import dper.study.codes.concurrent.service.ConcurrentExampleService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ApplicationContext ac = new ClassPathXmlApplicationContext("appContext_concurrent_beans.xml") ;
        ConcurrentExampleAPI concurrentExampleService = (ConcurrentExampleService)ac.getBean("concurrentExampleService") ;
//        System.out.println( concurrentExampleService.displayCountDownLatchUsage() );

        System.out.println( concurrentExampleService.displayThreadLocalUsage() );
    }
}
